﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IapApp.Entity;

namespace IapApp.Manager
{
    public class SecurityManager
    {
        //private static Access[] access = null;

        public static bool IsAdminUser(int userLoginId)
        {
            var isAdmin = false;
            foreach (var usr in AppGlobal.AdminUsers)
            {
                var cond1 = usr;
                var cond2 = userLoginId;
                if (cond1.Equals(cond2))
                {
                    isAdmin = true;
                }
            }
            return isAdmin;
        }

        public static bool IsAdminUser(AppUser user)
        {
            return IsAdminUser(user.Id);
        }

        public static bool GetAccess(string serviceName, string jobName)
        {
            //if (access == null) return false;
            const bool haveAccess = false;
            return haveAccess;
        }
    }
}
